<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    {% include 'link_css.html' %}
    {% include 'head_script.html' %}
</head>
<body>
<div class="content-wrapper">


    <section class="content">

<div id="dialog">
        <div class="box">
            <form class="form-horizontal" action="{% url 'asset_edit' ids %}" method="POST">
                        {% csrf_token %}
              <div class="box-body">
                <div class="form-group">
                  <label for="hostname" class="col-sm-2 control-label">主机名:</label>

                  <div class="col-sm-10">
                      {{ af.hostname }}
                  </div>
                </div>
                <div class="form-group">
                  <label for="ip" class="col-sm-2 control-label">IP地址:</label>

                  <div class="col-sm-10">
                    {{ af.ip }}
                  </div>
                </div>
                <div class="form-group">
                  <label for="other_ip" class="col-sm-2 control-label">其它IP:</label>

                  <div class="col-sm-10">
                    {{ af.other_ip }}
                  </div>
                </div>
              <div class="form-group">
                  <label for="group" class="col-sm-2 control-label">主机组:</label>
                  <div class="col-sm-10">
                       {{ af.group }}
                    </div>
                </div>
              <div class="form-group">
                  <label for="asset_type" class="col-sm-2 control-label">资产编号:</label>
                  <div class="col-sm-10">
                       {{ af.asset_no }}
                    </div>
              </div>
              <div class="form-group">
                  <label for="asset_type" class="col-sm-2 control-label">设备类型:</label>
                  <div class="col-sm-10">
                       {{ af.asset_type }}
                    </div>
              </div>
              <div class="form-group">
                  <label for="status" class="col-sm-2 control-label">设备状态:</label>
                  <div class="col-sm-10">
                       {{ af.status }}
                    </div>
              </div>
                <div class="form-group">
                  <label for="os" class="col-sm-2 control-label">操作系统:</label>
                  <div class="col-sm-10">
                    {{ af.os }}
                  </div>
                </div>
                <div class="form-group">
                  <label for="vendor" class="col-sm-2 control-label">设备厂商:</label>

                  <div class="col-sm-10">
                    {{ af.vendor }}
                  </div>
                </div>
                <div class="form-group">
                  <label for="cpu_model" class="col-sm-2 control-label">CPU型号:</label>

                  <div class="col-sm-10">
                    {{ af.cpu_model }}
                  </div>
                </div>
                <div class="form-group">
                  <label for="cpu_num" class="col-sm-2 control-label">CPU数量:</label>

                  <div class="col-sm-10">
                    {{ af.cpu_num }}
                  </div>
                </div>
                <div class="form-group">
                  <label for="memory" class="col-sm-2 control-label">内存大小:</label>

                  <div class="col-sm-10">
                    {{ af.memory }}
                  </div>
                </div>
                <div class="form-group">
                  <label for="disk" class="col-sm-2 control-label">硬盘信息:</label>

                  <div class="col-sm-10">
                    {{ af.disk }}
                  </div>
                </div>
                <div class="form-group">
                  <label for="sn" class="col-sm-2 control-label">SN号码:</label>

                  <div class="col-sm-10">
                    {{ af.sn }}
                  </div>
                </div>
              <div class="form-group">
                  <label for="idc" class="col-sm-2 control-label">所在机房:</label>
                  <div class="col-sm-10">
                       {{ af.idc }}
                    </div>
              </div>

                <div class="form-group">
                  <label for="position" class="col-sm-2 control-label">位置信息:</label>

                  <div class="col-sm-10">
                    {{ af.position }}
                  </div>
                </div>
                <div class="form-group">
                  <label for="memo" class="col-sm-2 control-label">备注信息:</label>

                  <div class="col-sm-10">
                    {{ af.memo }}
                  </div>
                </div>
{#                <input type="hidden" name="id" value="{{ obj.id }}">#}
              </div>
              <!-- /.box-body -->
              <div class="box-footer">
                <button type="submit" class="btn btn-info pull-left" style="width: 120px"><b>保存</b></button>
              </div>
              <!-- /.box-footer -->
            </form>

</div>
</div>

    </section>

  </div>
{#回传参数至父层#}
<script type="text/javascript">
        var index = parent.layer.getFrameIndex(window.name);
        var success = {{ status }};
        if ( success == '1' ) {
            parent.$("#handle_status").val('1');
              parent.layer.close(index);
        } else if( success == '2' ) {
            parent.$("#handle_status").val('2');
            parent.layer.close(index);
        }
</script>
</body>
</html>